package com.dingxin.ship_together_api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* Author: ctj
* Date: 2022-08-09
* Time: 14:53
*/

/**
    * 系统菜单（权限）表
    */
@ApiModel(value="系统菜单（权限）表")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "ship_together.sys_menu")
public class SysMenu implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="")
    private Integer id;

    /**
     * 父级ID
     */
    @TableField(value = "pid")
    @ApiModelProperty(value="父级ID")
    private Integer pid;

    /**
     * 标题
     */
    @TableField(value = "title")
    @ApiModelProperty(value="标题")
    private String title;

    /**
     * 权限标识符：对于后台控制类定义。示例：user:list
     */
    @TableField(value = "code")
    @ApiModelProperty(value="权限标识符：对于后台控制类定义。示例：user:list")
    private String code;

    /**
     * 权限类型：1- 目录 | 2 - 菜单-主菜单 | 3 - 按钮 | 5-左侧菜单
     */
    @TableField(value = "`type`")
    @ApiModelProperty(value="权限类型：1- 目录 | 2 - 菜单-主菜单 | 3 - 按钮 | 5-左侧菜单")
    private Integer type;

    /**
     * 链接的url
     */
    @TableField(value = "url")
    @ApiModelProperty(value="链接的url")
    private String url;

    /**
     * 菜单 排序  数值越大越靠前
     */
    @TableField(value = "`order`")
    @ApiModelProperty(value="菜单 排序  数值越大越靠前")
    private Integer order;

    /**
     * 删除 1-删除  0-未删除
     */
    @TableField(value = "`deleted`")
    @ApiModelProperty(value="删除 1-删除  0-未删除")
    private Boolean deleted;


    /**
     * 创建人
     */
    @TableField(value = "create_by" ,fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "update_by",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @ApiModelProperty(value="更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_PID = "pid";

    public static final String COL_TITLE = "title";

    public static final String COL_CODE = "code";

    public static final String COL_TYPE = "type";

    public static final String COL_URL = "url";

    public static final String COL_ORDER = "order";

    public static final String COL_DELETED= "deleted";

    public static final String COL_CREATE_BY = "create_by";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_BY = "update_by";

    public static final String COL_UPDATE_TIME = "update_time";
}